package com.fis.vaadin;

import com.fss.dictionary.DictionaryNode;
import com.vaadin.ui.Button;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.ComboBox;
import com.vaadin.ui.Component;
import com.vaadin.ui.DateField;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.Link;
import com.vaadin.ui.ListSelect;
import com.vaadin.ui.MenuBar;
import com.vaadin.ui.OptionGroup;
import com.vaadin.ui.PasswordField;
import com.vaadin.ui.RichTextArea;
import com.vaadin.ui.Slider;
import com.vaadin.ui.Table;
import com.vaadin.ui.TextArea;
import com.vaadin.ui.TextField;
import com.vaadin.ui.Tree;
import com.vaadin.ui.TreeTable;
import com.vaadin.ui.Upload;

import de.essendi.vaadin.ui.component.numberfield.NumberField;

public interface ControlCreator {
	
	TextField createTextControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	Upload createFileControl(Component component, DictionaryNode dictionaryNode)
			throws Exception;

	NumberField createNumberControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	TextArea createTextAreaControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	PasswordField createPasswordControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	Tree createTreeControl(Component component, DictionaryNode dictionaryNode)
			throws Exception;

	DateField createDateControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	ComboBox createComboBoxControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	Table createTableControl(Component component, DictionaryNode dictionaryNode)
			throws Exception;

	CheckBox createCheckBoxControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	Button createButtonControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	Link createLinkControl(Component component, DictionaryNode dictionaryNode)
			throws Exception;

	Embedded createEmbeddedControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	RichTextArea createRichTextControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	ListSelect createListSelectControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	OptionGroup createOptionGroupControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	Slider createSliderControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	TreeTable createTreeTableControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	MenuBar createMenuBarControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	Component createUserDefinedControl(Component component,
			DictionaryNode dictionaryNode) throws Exception;

	@SuppressWarnings("rawtypes")
	Object createVaadinControl(Class controlClass, Component component,
			DictionaryNode dictionaryNode) throws Exception;
}
